require('./mongoose')
var mongoose = require('mongoose');
var Schema = mongoose.Schema;

/**
  schemadef: 所属模型
  url: 图片base64编码
*/
var schemaIconSchema = Schema({
  schemadef: { type: Schema.Types.ObjectId, ref: 'SchemaDef', required: true, unique: true },
  url: { type: String, required: true }
})

var SchemaIcon = mongoose.model('SchemaIcon', schemaIconSchema);

module.exports = SchemaIcon
